<script>
	import config from './config'

	export default {
		globalData() {
			return {
				// 音频对象
				audioMusic: {},
				titletop: 0,
				titleheight: 0,
				statusBarHeight: 0,
			}
		},
		onLaunch: function() {
			this.initApp()
			//音乐
			this.globalData.audioMusic = uni.getBackgroundAudioManager();
		},
		methods: {
			// 初始化应用
			initApp() {
				// 初始化应用配置
				this.initConfig()
			},
			initConfig() {
				this.globalData.config = config
			},
			// 获取系统配置高度
			getHeight() {
				// 获取胶囊高度
				let res = uni.getMenuButtonBoundingClientRect();
				this.titletop = res.top;
				this.titleheight = res.height;
				// 获取信号栏高度
				uni.getSystemInfo({
					success: (res) => {
						this.statusBarHeight = res.statusBarHeight
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";
	@import '@/static/scss/index.scss';

	page {
		background-color: #fff;
	}
</style>